Imports BusinessLayer
Imports EntityLayer
Imports System.Data

Partial Class VistaCartaPresentacion
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not Page.IsPostBack Then
            Dim strIdCarta As String
            strIdCarta = Request.QueryString("NC")

            Dim dt As DataTable
            dt = CartaPresentacionBL.ListarCartaPresentacionxCodigo(strIdCarta).Tables(0)

            txtCodCarta.Text = dt.Rows(0)(0).ToString
            txtFechaEmision.Text = dt.Rows(0)(1).ToString
            txtDestinatario.Text = dt.Rows(0)(2).ToString
            txtDescripcion.Text = dt.Rows(0)(3).ToString
            txtPostulante.Text = dt.Rows(0)(4).ToString
            txtRUC.Text = dt.Rows(0)(5).ToString
            txtRazonSocial.Text = dt.Rows(0)(6).ToString
            txtDireccion.Text = dt.Rows(0)(7).ToString
            txtRubro.Text = dt.Rows(0)(8).ToString
            txtContacto.Text = dt.Rows(0)(9).ToString
            txtTelefono.Text = dt.Rows(0)(10).ToString
            txtEmail.Text = dt.Rows(0)(11).ToString
            txtUrl.Text = dt.Rows(0)(12).ToString

            gvwProducto.DataSource = ProductoPostulanteBL.ListarProductosAsignados(strIdCarta)
            gvwProducto.DataBind()

        End If
    End Sub
End Class
